public class Course {

    private String courseNo;
    private String courseName;
    private int  courseNum;
    private int credit;

    public Course(){

    }
    public Course(String a,String b,int c,int d){
        this.courseNo=a;
        this.courseName=b;
        this.courseNum=c;
        this.credit=d;
    }

    private void setters(){

    }
    private void getters(){

    }

    public String toString(){
        return "课程编号:"+this.courseNo+" 课程名称:"+this.courseName+" 课时数:"+this.courseNum+" 课程学分:"+this.credit;
    }
}

class  Test4{
    public static void main(String[] args) {
        Course course=new Course("123","Java",48,2);
        System.out.println(course);
    }

}
